# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Sven Pfleiderer <pfleidi@roothausen.de>

pkgname=stfl
pkgver=0.24
pkgrel=5
pkgdesc="Library implementing a curses-based widget set for text terminals"
arch=('loong64' 'x86_64')
url="http://clifford.at/stfl/"
license=('GPL3')
depends=('ncurses')
makedepends=('patch' 'swig')
changelog=$pkgname.changelog
source=(http://clifford.at/stfl/$pkgname-$pkgver.tar.gz
        $pkgname-archlinux.patch)
sha256sums=('d4a7aa181a475aaf8a8914a8ccb2a7ff28919d4c8c0f8a061e17a0c36869c090'
            'c7d7c787bcd287a776aad3b26e6a90a3b121c281125c34c7c35a87f36dcdc453')

build() {
  cd "${srcdir}"/$pkgname-$pkgver

  patch -Np1 -i "${srcdir}"/$pkgname-archlinux.patch

  make prefix=/usr Makefile.deps
  make prefix=/usr
}

package() {
  cd "${srcdir}"/$pkgname-$pkgver

  make prefix=/usr DESTDIR="${pkgdir}" install

#library symlink - FS#34890
  ln -s /usr/lib/libstfl.so.0.24 "${pkgdir}"/usr/lib/libstfl.so.0
}
